{extends file="index.tpl"} 
{block name="page-content"}
{literal}
<script type="text/javascript">
$(document).ready(function() {
	$('input[name="name"]').blur(function() {
		var name=$('input[name="name"]').val();
		$.ajax({
			type: "GET",
			url: "http://thanhphogame.com/admin/controller/process/ajaxCheckNameMMBG.php?name="+name,
			data: { name: name }
		}).done(function(res) {
			if (res == 1){
				$('#name').css({"border-color": "red"});
			} else {
				$('#name').css({"border-color": "#CCC"});
			}
		});                   
	});
});          
</script>
{/literal}
	<div class="row-fluid">
		<div class="span12">
		<div class="block">
			<div class="head">
				<h2>Add Game Category MyMobiGame</h2>
				<ul class="buttons">
					<li>
						<a href="#" onClick="source('tabs'); return false;">
							<div class="icon">
								<span class="ico-info"></span>
							</div> 
						</a>
					</li>
				</ul>
			</div>
			
			<form id="validate" method="POST" action="{$WEB_BASE_URL}/index.php?controller=gameCategory&action=addMMBG">
				<div class="data-fluid">
					<div class="row-form">
						<div class="span2">Loại Game</div>
						<div class="span10">
							<select name="loaigame" class="select" style="width: 100%;">
								<option value="2">Game Online</option>
								<option value="3">Game Offline</option>
								<option value="4">Game Web</option>
								<option value="78">Game Kinh Điển</option>
							</select>
						</div>
					</div>
					<div class="row-form">
						<div class="span2">Parent:</div>
						<div class="span10">
							<select name="parent" class="select" style="width: 100%;">
								<option value="0">--- Chọn Parent ---</option>
								<option value="2">Game Online</option>
								<option value="3">Game Offline</option>
								<option value="4">Game Web</option>
								<option value="78">Game Kinh Điển</option>
							</select>
						</div>
					</div>
					<div class="row-form">
						<div class="span2">Name</div>
						<div class="span10">
							<input type="text" class="validate[required]" name="name" id="name" /> 
							<span class="bottom">Required</span>
						</div>
					</div>
					<div class="row-form">
						<div class="span2">Image</div>
						<div class="span10">
							<input type="text" class="validate[required]" name="image" /> 
							<span class="bottom">Required</span>
						</div>
					</div>
					<div class="row-form">
						<div class="span2">XLarge Image</div>
						<div class="span10">
							<input type="text" name="xlargeImage" />
						</div>
					</div>  
					
					<div class="row-form">
						<div class="span2">SEO_metaDescription</div>
						<div class="span10"><textarea name="SEO_metaDescription" placeholder="Placeholder example" class="validate[required]"></textarea></div>
					</div>
					<div class="row-form">
						<div class="span2">SEO_keyword</div>
						<div class="span10"><input name="SEO_keyword" type="text" class="tags"/></div>
					</div>
					<div class="row-form">
						<div class="span2">linkMWork</div>
						<div class="span10">
							<input type="text" class="validate[required]" name="linkMWork" id="linkMWork" /> 
							<span class="bottom">Required</span>
						</div>
					</div>
					<div class="row-form">
						<div class="span2">Hot Star:</div>
						<div class="span10">
							<select name="hot_star" class="select" style="width: 100%;">
								<option value="0">Ẩn</option>
								<option value="5">Hiện</option>
							</select>
						</div>
					</div>
					<div class="toolbar bottom tar">
						<div class="btn-group">
							<button class="btn btn-info" type="button" onClick="$('#validate').validationEngine('hide');">Hide prompts</button>
                                <button class="btn" type="submit">Thêm Game Category Mobile</button>
                            </div>
                       	</div>
					</div>
				</form>
			</div>
		</div>
	</div>


{/block}


